﻿using System;

namespace csharp
{
    class Program
    {
        static void Main(string[] args)
        {
            System.Console.WriteLine("-----汉诺塔游戏-----");

            System.Console.WriteLine("请设置环的数量：");
            var annulusCount = System.Console.ReadLine();

            System.Console.WriteLine("\r\n-----游戏即将开始-----\r\n");

            var ht = new HanoiTower();
            var stepsMoved = 0;
            var collection =
                ht.move(Convert.ToInt32(annulusCount), 'A', 'C', 'B');

            foreach (var msg in collection)
            {
                stepsMoved++;
                System.Console.Write (msg);
            }
            System
                .Console
                .WriteLine("\r\n\r\n移动结束，" +
                "累计移动了共 [" +
                stepsMoved.ToString() +
                "] 步。" +
                "再见！\r\n");
        }
    }
}
